﻿using HorseRaceTracker.Domain.Core;

namespace HorseRaceTracker.Application.DTO
{
    internal class HorseInfoAssember
    {
        public HorseInfo HorseInfo { get; private set;}
        public HorseInfoAssember()
        {
            HorseInfo= new HorseInfo();
        }
        public HorseInfoAssember AddHorse(Horse horse)
        {
            HorseInfo.BirthYear = horse.BirthYear;
            HorseInfo.BredIn= new CountryInfoAssembler().AddCountry(horse.BredIn).CountryInfo;
            HorseInfo.HorseIdentifier = horse.HorseIdentifier;
            HorseInfo.Name = horse.Name;
            HorseInfo.Sex = new GenderInfoAssembler().AddGender(horse.Sex).GenderInfo;
            HorseInfo.Trainer = new TrainerInfoAssembler().AddTrainer(horse.Trainer).TrainerInfo;
            return this;
        }

      
    }
}